import 'package:xin_he/generated/json/base/json_convert_content.dart';
import 'package:xin_he/page/shopping_car/xin_he_goods_payment/xin_he_pay_success/xin_he_order_detail_entity.dart';

XinHeOrderDetailEntity $XinHeOrderDetailEntityFromJson(Map<String, dynamic> json) {
	final XinHeOrderDetailEntity xinHeOrderDetailEntity = XinHeOrderDetailEntity();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		xinHeOrderDetailEntity.id = id;
	}
	final dynamic userId = jsonConvert.convert<dynamic>(json['userId']);
	if (userId != null) {
		xinHeOrderDetailEntity.userId = userId;
	}
	final String? fShopId = jsonConvert.convert<String>(json['fShopId']);
	if (fShopId != null) {
		xinHeOrderDetailEntity.fShopId = fShopId;
	}
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		xinHeOrderDetailEntity.code = code;
	}
	final double? orderFee = jsonConvert.convert<double>(json['orderFee']);
	if (orderFee != null) {
		xinHeOrderDetailEntity.orderFee = orderFee;
	}
	final String? type = jsonConvert.convert<String>(json['type']);
	if (type != null) {
		xinHeOrderDetailEntity.type = type;
	}
	final String? distributionType = jsonConvert.convert<String>(json['distributionType']);
	if (distributionType != null) {
		xinHeOrderDetailEntity.distributionType = distributionType;
	}
	final String? status = jsonConvert.convert<String>(json['status']);
	if (status != null) {
		xinHeOrderDetailEntity.status = status;
	}
	final String? buyerRemark = jsonConvert.convert<String>(json['buyerRemark']);
	if (buyerRemark != null) {
		xinHeOrderDetailEntity.buyerRemark = buyerRemark;
	}
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		xinHeOrderDetailEntity.createTime = createTime;
	}
	final dynamic payTime = jsonConvert.convert<dynamic>(json['payTime']);
	if (payTime != null) {
		xinHeOrderDetailEntity.payTime = payTime;
	}
	final int? remindSend = jsonConvert.convert<int>(json['remindSend']);
	if (remindSend != null) {
		xinHeOrderDetailEntity.remindSend = remindSend;
	}
	final dynamic remindSendTime = jsonConvert.convert<dynamic>(json['remindSendTime']);
	if (remindSendTime != null) {
		xinHeOrderDetailEntity.remindSendTime = remindSendTime;
	}
	final List<XinHeOrderDetailOrderItems>? orderItems = jsonConvert.convertListNotNull<XinHeOrderDetailOrderItems>(json['orderItems']);
	if (orderItems != null) {
		xinHeOrderDetailEntity.orderItems = orderItems;
	}
	final XinHeOrderDetailOrderAddress? orderAddress = jsonConvert.convert<XinHeOrderDetailOrderAddress>(json['orderAddress']);
	if (orderAddress != null) {
		xinHeOrderDetailEntity.orderAddress = orderAddress;
	}
	final XinHeOrderDetailShop? shop = jsonConvert.convert<XinHeOrderDetailShop>(json['shop']);
	if (shop != null) {
		xinHeOrderDetailEntity.shop = shop;
	}
	return xinHeOrderDetailEntity;
}

Map<String, dynamic> $XinHeOrderDetailEntityToJson(XinHeOrderDetailEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['userId'] = entity.userId;
	data['fShopId'] = entity.fShopId;
	data['code'] = entity.code;
	data['orderFee'] = entity.orderFee;
	data['type'] = entity.type;
	data['distributionType'] = entity.distributionType;
	data['status'] = entity.status;
	data['buyerRemark'] = entity.buyerRemark;
	data['createTime'] = entity.createTime;
	data['payTime'] = entity.payTime;
	data['remindSend'] = entity.remindSend;
	data['remindSendTime'] = entity.remindSendTime;
	data['orderItems'] =  entity.orderItems?.map((v) => v.toJson()).toList();
	data['orderAddress'] = entity.orderAddress?.toJson();
	data['shop'] = entity.shop?.toJson();
	return data;
}

XinHeOrderDetailOrderItems $XinHeOrderDetailOrderItemsFromJson(Map<String, dynamic> json) {
	final XinHeOrderDetailOrderItems xinHeOrderDetailOrderItems = XinHeOrderDetailOrderItems();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		xinHeOrderDetailOrderItems.id = id;
	}
	final String? fUserId = jsonConvert.convert<String>(json['fUserId']);
	if (fUserId != null) {
		xinHeOrderDetailOrderItems.fUserId = fUserId;
	}
	final String? fOrderId = jsonConvert.convert<String>(json['fOrderId']);
	if (fOrderId != null) {
		xinHeOrderDetailOrderItems.fOrderId = fOrderId;
	}
	final String? fGoodsId = jsonConvert.convert<String>(json['fGoodsId']);
	if (fGoodsId != null) {
		xinHeOrderDetailOrderItems.fGoodsId = fGoodsId;
	}
	final String? fGoodsPriceId = jsonConvert.convert<String>(json['fGoodsPriceId']);
	if (fGoodsPriceId != null) {
		xinHeOrderDetailOrderItems.fGoodsPriceId = fGoodsPriceId;
	}
	final double? goodsPrice = jsonConvert.convert<double>(json['goodsPrice']);
	if (goodsPrice != null) {
		xinHeOrderDetailOrderItems.goodsPrice = goodsPrice;
	}
	final int? goodsAmount = jsonConvert.convert<int>(json['goodsAmount']);
	if (goodsAmount != null) {
		xinHeOrderDetailOrderItems.goodsAmount = goodsAmount;
	}
	final double? itemPrice = jsonConvert.convert<double>(json['itemPrice']);
	if (itemPrice != null) {
		xinHeOrderDetailOrderItems.itemPrice = itemPrice;
	}
	final int? zoneType = jsonConvert.convert<int>(json['zoneType']);
	if (zoneType != null) {
		xinHeOrderDetailOrderItems.zoneType = zoneType;
	}
	final String? status = jsonConvert.convert<String>(json['status']);
	if (status != null) {
		xinHeOrderDetailOrderItems.status = status;
	}
	final dynamic remark = jsonConvert.convert<dynamic>(json['remark']);
	if (remark != null) {
		xinHeOrderDetailOrderItems.remark = remark;
	}
	final int? versionNum = jsonConvert.convert<int>(json['versionNum']);
	if (versionNum != null) {
		xinHeOrderDetailOrderItems.versionNum = versionNum;
	}
	final int? removed = jsonConvert.convert<int>(json['removed']);
	if (removed != null) {
		xinHeOrderDetailOrderItems.removed = removed;
	}
	final int? createTime = jsonConvert.convert<int>(json['createTime']);
	if (createTime != null) {
		xinHeOrderDetailOrderItems.createTime = createTime;
	}
	final int? updateTime = jsonConvert.convert<int>(json['updateTime']);
	if (updateTime != null) {
		xinHeOrderDetailOrderItems.updateTime = updateTime;
	}
	final String? fCreateUserId = jsonConvert.convert<String>(json['fCreateUserId']);
	if (fCreateUserId != null) {
		xinHeOrderDetailOrderItems.fCreateUserId = fCreateUserId;
	}
	final dynamic fUpdateUserId = jsonConvert.convert<dynamic>(json['fUpdateUserId']);
	if (fUpdateUserId != null) {
		xinHeOrderDetailOrderItems.fUpdateUserId = fUpdateUserId;
	}
	return xinHeOrderDetailOrderItems;
}

Map<String, dynamic> $XinHeOrderDetailOrderItemsToJson(XinHeOrderDetailOrderItems entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['fUserId'] = entity.fUserId;
	data['fOrderId'] = entity.fOrderId;
	data['fGoodsId'] = entity.fGoodsId;
	data['fGoodsPriceId'] = entity.fGoodsPriceId;
	data['goodsPrice'] = entity.goodsPrice;
	data['goodsAmount'] = entity.goodsAmount;
	data['itemPrice'] = entity.itemPrice;
	data['zoneType'] = entity.zoneType;
	data['status'] = entity.status;
	data['remark'] = entity.remark;
	data['versionNum'] = entity.versionNum;
	data['removed'] = entity.removed;
	data['createTime'] = entity.createTime;
	data['updateTime'] = entity.updateTime;
	data['fCreateUserId'] = entity.fCreateUserId;
	data['fUpdateUserId'] = entity.fUpdateUserId;
	return data;
}

XinHeOrderDetailOrderAddress $XinHeOrderDetailOrderAddressFromJson(Map<String, dynamic> json) {
	final XinHeOrderDetailOrderAddress xinHeOrderDetailOrderAddress = XinHeOrderDetailOrderAddress();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		xinHeOrderDetailOrderAddress.id = id;
	}
	final dynamic fUserId = jsonConvert.convert<dynamic>(json['fUserId']);
	if (fUserId != null) {
		xinHeOrderDetailOrderAddress.fUserId = fUserId;
	}
	final String? fOrderId = jsonConvert.convert<String>(json['fOrderId']);
	if (fOrderId != null) {
		xinHeOrderDetailOrderAddress.fOrderId = fOrderId;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		xinHeOrderDetailOrderAddress.name = name;
	}
	final String? telephone = jsonConvert.convert<String>(json['telephone']);
	if (telephone != null) {
		xinHeOrderDetailOrderAddress.telephone = telephone;
	}
	final String? province = jsonConvert.convert<String>(json['province']);
	if (province != null) {
		xinHeOrderDetailOrderAddress.province = province;
	}
	final String? city = jsonConvert.convert<String>(json['city']);
	if (city != null) {
		xinHeOrderDetailOrderAddress.city = city;
	}
	final String? area = jsonConvert.convert<String>(json['area']);
	if (area != null) {
		xinHeOrderDetailOrderAddress.area = area;
	}
	final String? detail = jsonConvert.convert<String>(json['detail']);
	if (detail != null) {
		xinHeOrderDetailOrderAddress.detail = detail;
	}
	final String? type = jsonConvert.convert<String>(json['type']);
	if (type != null) {
		xinHeOrderDetailOrderAddress.type = type;
	}
	final dynamic remark = jsonConvert.convert<dynamic>(json['remark']);
	if (remark != null) {
		xinHeOrderDetailOrderAddress.remark = remark;
	}
	final dynamic versionNum = jsonConvert.convert<dynamic>(json['version_num']);
	if (versionNum != null) {
		xinHeOrderDetailOrderAddress.versionNum = versionNum;
	}
	final dynamic removed = jsonConvert.convert<dynamic>(json['removed']);
	if (removed != null) {
		xinHeOrderDetailOrderAddress.removed = removed;
	}
	final dynamic createTime = jsonConvert.convert<dynamic>(json['createTime']);
	if (createTime != null) {
		xinHeOrderDetailOrderAddress.createTime = createTime;
	}
	final dynamic updateTime = jsonConvert.convert<dynamic>(json['updateTime']);
	if (updateTime != null) {
		xinHeOrderDetailOrderAddress.updateTime = updateTime;
	}
	final dynamic fCreateUserId = jsonConvert.convert<dynamic>(json['fCreateUserId']);
	if (fCreateUserId != null) {
		xinHeOrderDetailOrderAddress.fCreateUserId = fCreateUserId;
	}
	final dynamic fUpdateUserId = jsonConvert.convert<dynamic>(json['fUpdateUserId']);
	if (fUpdateUserId != null) {
		xinHeOrderDetailOrderAddress.fUpdateUserId = fUpdateUserId;
	}
	return xinHeOrderDetailOrderAddress;
}

Map<String, dynamic> $XinHeOrderDetailOrderAddressToJson(XinHeOrderDetailOrderAddress entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['fUserId'] = entity.fUserId;
	data['fOrderId'] = entity.fOrderId;
	data['name'] = entity.name;
	data['telephone'] = entity.telephone;
	data['province'] = entity.province;
	data['city'] = entity.city;
	data['area'] = entity.area;
	data['detail'] = entity.detail;
	data['type'] = entity.type;
	data['remark'] = entity.remark;
	data['version_num'] = entity.versionNum;
	data['removed'] = entity.removed;
	data['createTime'] = entity.createTime;
	data['updateTime'] = entity.updateTime;
	data['fCreateUserId'] = entity.fCreateUserId;
	data['fUpdateUserId'] = entity.fUpdateUserId;
	return data;
}

XinHeOrderDetailShop $XinHeOrderDetailShopFromJson(Map<String, dynamic> json) {
	final XinHeOrderDetailShop xinHeOrderDetailShop = XinHeOrderDetailShop();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		xinHeOrderDetailShop.id = id;
	}
	final dynamic iconPath = jsonConvert.convert<dynamic>(json['iconPath']);
	if (iconPath != null) {
		xinHeOrderDetailShop.iconPath = iconPath;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		xinHeOrderDetailShop.name = name;
	}
	final dynamic telephone = jsonConvert.convert<dynamic>(json['telephone']);
	if (telephone != null) {
		xinHeOrderDetailShop.telephone = telephone;
	}
	final String? province = jsonConvert.convert<String>(json['province']);
	if (province != null) {
		xinHeOrderDetailShop.province = province;
	}
	final String? city = jsonConvert.convert<String>(json['city']);
	if (city != null) {
		xinHeOrderDetailShop.city = city;
	}
	final String? area = jsonConvert.convert<String>(json['area']);
	if (area != null) {
		xinHeOrderDetailShop.area = area;
	}
	final String? detail = jsonConvert.convert<String>(json['detail']);
	if (detail != null) {
		xinHeOrderDetailShop.detail = detail;
	}
	final String? longitude = jsonConvert.convert<String>(json['longitude']);
	if (longitude != null) {
		xinHeOrderDetailShop.longitude = longitude;
	}
	final String? latitude = jsonConvert.convert<String>(json['latitude']);
	if (latitude != null) {
		xinHeOrderDetailShop.latitude = latitude;
	}
	final String? fUserId = jsonConvert.convert<String>(json['fUserId']);
	if (fUserId != null) {
		xinHeOrderDetailShop.fUserId = fUserId;
	}
	final String? address = jsonConvert.convert<String>(json['address']);
	if (address != null) {
		xinHeOrderDetailShop.address = address;
	}
	final String? remark = jsonConvert.convert<String>(json['remark']);
	if (remark != null) {
		xinHeOrderDetailShop.remark = remark;
	}
	final int? versionNum = jsonConvert.convert<int>(json['version_num']);
	if (versionNum != null) {
		xinHeOrderDetailShop.versionNum = versionNum;
	}
	final int? removed = jsonConvert.convert<int>(json['removed']);
	if (removed != null) {
		xinHeOrderDetailShop.removed = removed;
	}
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		xinHeOrderDetailShop.createTime = createTime;
	}
	final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
	if (updateTime != null) {
		xinHeOrderDetailShop.updateTime = updateTime;
	}
	final String? fCreateUserId = jsonConvert.convert<String>(json['fCreateUserId']);
	if (fCreateUserId != null) {
		xinHeOrderDetailShop.fCreateUserId = fCreateUserId;
	}
	final String? fUpdateUserId = jsonConvert.convert<String>(json['fUpdateUserId']);
	if (fUpdateUserId != null) {
		xinHeOrderDetailShop.fUpdateUserId = fUpdateUserId;
	}
	return xinHeOrderDetailShop;
}

Map<String, dynamic> $XinHeOrderDetailShopToJson(XinHeOrderDetailShop entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['iconPath'] = entity.iconPath;
	data['name'] = entity.name;
	data['telephone'] = entity.telephone;
	data['province'] = entity.province;
	data['city'] = entity.city;
	data['area'] = entity.area;
	data['detail'] = entity.detail;
	data['longitude'] = entity.longitude;
	data['latitude'] = entity.latitude;
	data['fUserId'] = entity.fUserId;
	data['address'] = entity.address;
	data['remark'] = entity.remark;
	data['version_num'] = entity.versionNum;
	data['removed'] = entity.removed;
	data['createTime'] = entity.createTime;
	data['updateTime'] = entity.updateTime;
	data['fCreateUserId'] = entity.fCreateUserId;
	data['fUpdateUserId'] = entity.fUpdateUserId;
	return data;
}